<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>案件列表</title>
		<meta name="description" content="">
		<meta name="keywords" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="stylesheet" type="text/css" href="/mobile/Public/admin/css/sty.css"/>
		<link rel="stylesheet" type="text/css" href="/mobile/Public/admin/css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="/mobile/Public/admin/css/page.css"/>
		<link rel="stylesheet" type="text/css" href="/mobile/Public/admin/css/laydate.css">
		<link href="/mobile/Public/mobile/css/mui.min.css" rel="stylesheet"/>
    	<link href="/mobile/Public/mobile/css/sty.css" rel="stylesheet"/>
		<script src="/mobile/Public/admin/js/jquery-1.12.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/mobile/Public/admin/js/laydate.dev.js"></script>
		 <script type="text/javascript" src="/mobile/Public/mobile/js/mui.min.js"></script>
		<style>
			.table_table{
				width: 92%;
			}
			.table_table tr td{
				width: 10%;
			}
			.off_head_left{
				margin-right:10px;
			}
			table.table_table {
				font-family: verdana,arial,sans-serif;
				font-size:11px;
				color:#333333;
				border-width: 1px;
				border-color: #666666;
				border-collapse: collapse;
			}
			table.table_table th {
				border-width: 1px;
				padding: 8px;
				border-style: solid;
				border-color: #666666;
				background-color: #dedede;
			}
			table.table_table td {
				border-width: 1px;
				padding: 8px;
				border-style: solid;
				border-color: #666666;
				background-color: #ffffff;
				text-align: center;
			}
		</style>
	</head>
	<body id="body" style="background-color: #fff;">
		<header class="mui-bar mui-bar-nav">
	        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	        <h1 class="mui-title">审判案件概况</h1>
        </header>
        <div class="mui-content">
			<div class="xChoseTime">
				<select class="xChoseYear" name="notestt" id="t1">
					<?php if(is_array($notestt)): foreach($notestt as $key=>$notestt): ?><option <?php if($ktime == $notestt['ktime']) echo selected;?> value="<?php echo ($notestt['id']); ?>"><?php echo ($notestt['table_name']); ?></option><?php endforeach; endif; ?>
				</select>
			</div>
			<script type="text/javascript">
			    function kaohe1(){
			    	var notes_id = $('#t1').val();
			    	$.ajax({
			    		url: 'y_one',
			    		type: 'post',
			    		data: {id:notes_id},
			    		success:function(mes){
			    			// alert(mes);
			    			$("#allScoreList").remove();
							$("#y_one").html(mes);
			    		}
			    	});
			    }
			    $('#t1').change(function(){
					kaohe1();
				});
			</script>
			<div id="allScoreList" style="width: 95%;height: 95vh;display: inline-block;margin-left: 2.5%;"></div>
			<div id="y_one">
				
			</div>
			<input type="hidden" value="<?php echo ($type1); ?>" id="allType" />
			<input type="hidden" value="<?php echo ($num2); ?>" id="num2" />
			<input type="hidden" value="<?php echo ($yj1); ?>" id="yj1" />
			<input type="hidden" value="<?php echo ($wj1); ?>" id="wj1" />
			<div class="table_list">
					<div class="xChoseTime">
						<select name="ktime" id="ttt" style="border: 1px solid #e1e1e1;" class="xChoseYear">
							<?php if(is_array($notes)): foreach($notes as $key=>$notes): ?><option value="<?php echo ($notes['id']); ?>"><?php echo ($notes['table_name']); ?></option><?php endforeach; endif; ?>
						</select>
					</div>
				<div class="off_head">	
					<!-- 年份改变js 开始 -->
					<script type="text/javascript">
					    function year(){
					    	var notes_id = $('#ttt').val();
					    	$.ajax({
					    		url: 'y_first',
					    		type: 'post',
					    		data: {id:notes_id},
					    		success:function(mes){
					    			// alert(mes);
					    			$('.table_table').remove();
					    			$('#aaa').html(mes);
					    		}
					    	});
					    }
					    $('#ttt').change(function(){
					    	year();
					    });
					</script>
					<!-- 年份改变js 结束 -->
					<script>
						function caseSearch(){
							var id = $('#ttt').val();
							var lian_time = $('#lian_time').val();
							var jiean_time = $('#jiean_time').val();
							var ca_type = $('#ca_type').val();
							var team = $('#team').val();
							var worker = $('#worker').val();
							$.ajax({
								url: 'caseManagement',
								type: 'post',
								data: {id:id,lian_time:lian_time,jiean_time:jiean_time,ca_type:ca_type,team:team,worker:worker},
								success:function(mes){
									// alert(mes);
									$('.table_table').remove();
					    			$('#aaa').remove();
					    			$('#bbb').html(mes);
								}
							});
						}
					</script>
				</div>			
				<table border="" cellspacing="" cellpadding="" class="table_table">
					<tr class="tr_head">
						<td>序号</td>
						<td>案件类别</td>
						<td style="width:20%;">案件名称</td>
						<!-- <td style="width:17%;">案件案由</td> -->
						<!-- <td>立案日期</td> -->
						<td>结案日期</td>
						<td>承办庭室</td>
						<td>承办人</td>
					</tr>
					<?php if(is_array($list)): foreach($list as $index=>$item): ?><tr>
						<td><?php echo ($index + '1'); ?></td>
						<td><?php echo ($item["case_type"]); ?></td>
						<td style="width:20%;"><?php echo ($item["case_name1"]); ?></td>
						<!-- <td style="width:17%;"><?php echo ($item["case_name2"]); ?></td> -->
						<!-- <td><?php echo date("Y-m-d",$item['ktime']);?></td> -->
						<td><?php echo date("Y年m月d日",$item['stime']);?></td>
						<td><?php echo ($item["team"]); ?></td>
						<td><?php echo ($item["worker"]); ?></td>
					</tr><?php endforeach; endif; ?>		
				</table>
				<div id="aaa"></div>
				<div id="bbb"></div>
			</div>
			<!-- 回到顶部 -->
			<div id="gotop" style="display: none;">
				<span class="mui-icon mui-icon-arrowthinup"></span>
			</div>
		</div>
		<script>
			var oTop = $('#gotop');//回到顶部
		    oTop.click(function(){
	            $('body,html').animate({"scrollTop":0},500)
		    });
		    $(window).scroll(function(){
		        var winH = $(window).height();//可视窗口高度
		        var iTop = $(window).scrollTop();//鼠标滚动的距离

		        if(iTop>=winH){
		               // oNav.fadeIn();
		               oTop.fadeIn();
		        }else{
		               // oNav.fadeOut();
		               oTop.fadeOut();
		        }
		    });	
		</script>
		<script type="text/javascript" src="/mobile/Public/admin/js/echarts.min.js"></script>
		<script type="text/javascript">
			var allType=$("#allType").val(); //案件类型
			var allTypes=allType.split(",");
			var num2=$("#num2").val(); //案件类型占的比重
			var num2s=num2.split(",");
			var yj1=$("#yj1").val(); //所有案件已结比例
			var yj1s=yj1.split(",");
			var wj1=$("#wj1").val(); //所有案件未结比例
			var wj1s=wj1.split(",");
			//			所有部门对比的饼状图
			var allScoreEvent = echarts.init(document.getElementById('allScoreList'));
			var data=[];
			for(var i=0;i<allTypes.length;i++){				
			    data.push({
				name:allTypes[i],			            
				value:num2s[i]			    
			    });
			}
			var series=[];
			series.push({
			    type: 'pie',
			    radius : '50%',
			    center: ['50%', '30%'],
			    color: ['#39CBCA', '#C2D138', '#FFA809', '#E25C36'],
			    data:data,
			    label: {
				    normal: {
						position: 'outside',
						formatter: ' {b}： {c}%',
						textStyle: {
						    color: '',
						    fontSize: 12
						}
				    }
				},
			    itemStyle: {
					emphasis: {
					    shadowBlur: 10,
					    shadowOffsetX: 0,
					    shadowColor: 'rgba(0, 0, 0, 0.5)'
					}
			    }
			});
			series.push({
			    name: '案件',
			    type: 'pie',
			    // roseType:'radius',
			    radius : '50%',
			    center: ['50%', '80%'],
			    color: ['#EE8064','#3DB5F5','#EE8064','#3DB5F5'],
			    data:[
				{value:yj1s, name:'已完结案件'},
				{value:wj1s, name:'未完结案件'},

			    ],
			    label: {
				normal: {
				    position: 'inside',
				    formatter: ' {b}： {c}%',
				    textStyle: {
					color: '',
					fontSize: 12
				    }
				}
			    },
			    itemStyle: {
				emphasis: {
				    shadowBlur: 10,
				    shadowOffsetX: 0,
				    shadowColor: 'rgba(0, 0, 0, 0.5)'
				}
			    }
			});
			var allScoreEventOption = {
				title :[{
                    text: '各类案件数占总案件数比例',
                    x: 'center',
                },{
                    text: '所有案件完结情况分析',
                    x:'center',
                    y:'55%'
                }],
                tooltip:{
                    trigger: 'item',
                    formatter: "{a} {b} :{d}%",
                    textStyle: {
                        fontSize:14
                    }
                },
                legend: {
                    orient: 'vertical',
                    left: 'left',
                    // data: ['优秀','通过','建议修改']
                },
                grid: [
                    {x: '7.5%',y: '65%', width: '88%', height: '30%'},
                ],
                series : series,
			};
			allScoreEvent.setOption(allScoreEventOption);
		</script>
	</body>
</html>